@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            REST_API: {
                imgData: $.parseJSON('{!! $data = \App\Http\Controllers\Admin\Member\Purchaser\PurchaserController::fileInfo($member->id) !!}'),
                backurl: "{{ route('admin.purchaser.index') }}", //返回地址
            },

        };
    </script>
@stop

@section('c-body')

    <div class="comm-title">
                <span class="title-msg">
                        会员 > 采购商 > 列表 > 查看/编辑
                    </span>
    </div>
    <div class="comm-body form-body">
        <form id="main-form" style="margin-top: 20px;" action="{{route('admin.purchaser.update',[$member->id])}}" method="post">
            <input type="hidden" name="_method" value="PUT">
            <input type="hidden" value="{{ csrf_token() }}" name="_token">
            <div class="input-line">
                <div class="key-txt user">
                    <span>用户名:</span>
                </div>
                <div class="input-val">
                    <span>{{$member->user}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    登录密码:
                </div>
                <div class="input-val">
                    <input name="password" style="width:100%;" />
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    电子邮箱:
                </div>
                <div class="input-val">
                    <span>{{$member->email}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    公司全称:
                </div>
                <div class="input-val">
                    <span>{{$member->information->company}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    公司法人:
                </div>
                <div class="input-val">
                    <span>{{$member->information->legal}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    <span>法人身份证</span>
                </div>
                <div class="input-val">
                    <span>{{$member->information->identification_number}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    所在地:
                </div>
                <div class="input-val">
                    <span>{{\App\B2BProject\Area::getName($member->information->province_id) . ' ' . \App\B2BProject\Area::getName($member->information->city_id)}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    公司地址:
                </div>
                <div class="input-val">
                    <span>{{$member->information->address}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    联系人姓名:
                </div>
                <div class="input-val">
                    <span>{{$member->information->contact_person}}</span>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    联系人电话:
                </div>
                <div class="input-val">
                    <span>{{$member->information->contact_phone}}</span>
                </div>
            </div>
            <div class="input-line clearfix" style="height:auto;">
                <div class="key-txt">
                    证件资料:
                </div>
                <div class="input-val picture-inlie" style="width:80%;height:160px;" id="picture">
                </div>
            </div>

            <div class="input-line clearfix" style="height:auto;">
                <div class="key-txt">
                </div>
                <div class="input-val" style="width:255px;top: -12px;">
                    <input id="submit-btn" type="submit" class="am-btn am-btn-primary am-btn-lg" value="保存" style="width: auto;height: auto;">
                    <button type="button" class="am-btn am-btn-default am-btn-lg returm-color cancel-btn">
                                <span style="display:block;">
                                    返回
                                </span>
                    </button>
                </div>
            </div>
        </form>
    </div>

    <!-- content end -->
    <a href="#" class="am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}">
        <span class="am-icon-btn am-icon-th-list">
            </span>
    </a>
    <footer>
        <hr>
        <p class="am-padding-left">
            &nbsp;
        </p>
    </footer>
    <!--[if lt IE 9]>
    <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js">
    </script>
    <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js">
    </script>
    <script src="/assets/b2b/admin/js/amazeui.ie8polyfill.min.js">
    </script>
    <![endif]-->
    <!--[if (gte IE 9)|!(IE)]>
            <!-->
    <script type="text/template" id="information_temp">
        <%_.each(obj, function(item){%>
        <div class="data-picture">
            <div class="picture">
                <a target="_blank" class="todooflyout" href="<%=item.img%>"><img src="<%=item.img%>"></a>
            </div>
            <span style="position:relative;"><%=item.text%></span>
        </div>
        <%})%>
    </script>
    <script src="/assets/b2b/admin/js/jquery.min.js"></script>
    <!--<![endif]-->
    <script src="/assets/b2b/admin/js/amazeui.js"></script>
    <script src="/assets/b2b/admin/js/libs/jquery.paging.min.js"></script>
    <script src="/assets/b2b/admin/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/admin/js/libs/underscore-min.js"></script>
    <script src="/assets/b2b/admin/js/libs/jquery.validate.min.js">
    </script>
    <script src="/assets/b2b/admin/js/libs/messages_zh.js">
    </script>
    <script src="/assets/b2b/admin/js/libs/util-admin.js">
    </script>
    <script src="/assets/b2b/admin/js/pages/14.js"></script>
@stop